﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SCRUM.Core.BusinessObjects
{
    /// <summary>
    /// One widget setting
    /// </summary>
    [Serializable()]
    public class WidgetSetting : BusinessObject
    {
        /// <summary>
        /// Gets or sets the associated widget.
        /// </summary>
        /// <value>The associated widget.</value>
        public Widget AssociatedWidget { get; set; }

        /// <summary>
        /// Gets or sets the associated user.
        /// </summary>
        /// <value>The associated user.</value>
        public User AssociatedUser { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>The value.</value>
        public string Value { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="WidgetSetting"/> class.
        /// </summary>
        /// <param name="w">The w.</param>
        /// <param name="u">The u.</param>
        /// <param name="name">The name.</param>
        /// <param name="value">The value.</param>
        public WidgetSetting(Widget w, User u, string name, string value)
            :base(-1)
        {
            this.AssociatedWidget = w;
            this.AssociatedUser = u;
            this.Name = name;
            this.Value = value;
        }
    }
}
